from django.contrib import admin
from admintest.computers.models import *


class ComputerAdmin(admin.ModelAdmin):
    pass
    #fields = ['first_name', 'last_name', 'address', 'suburb', 'state', 'country', 'email', 'date_added']
    fieldsets = [
            #(None,               {'fields': ['first_name', 'last_name']}),
            ('Basics',               {'fields': ['cbv_no', 'cpu_type', 'cpu_speed', 'case_type'], 'classes': ['extrapretty']}),
            ('Specs', {'fields': ['ram', 'hard_drive_size', 'optical_device1', 'optical_device2', 'monitor_type', 'monitor_size'], 'classes': ['expand']}),
            ('Peripherals', {'fields': ['modem_type', 'usb', 'usb_ports' ], 'classes': ['extrapretty', 'expand']}),
            ('Others', {'fields': ['distroversion', 'computer_status', 'baseprice', 'extraprice' ], 'classes': ['expand']}),
    ]
    #inlines = [ContactInline]
    search_fields = ('computer_status', 'cpu_type', 'distroversion', 'baseprice')

    list_display = ('cpu_type', 'cpu_speed', 'ram', 'hard_drive_size', 'distroversion', 'id')
    list_filter = ('computer_status', 'cpu_type', 'distroversion', 'baseprice')
admin.site.register(Computer, ComputerAdmin)
